export default {
  // 登陆
  LOGIN_IN (state, token) {
    state.UserToken = token
  },
  // 退出登陆
  LOGIN_OUT (state) {
    state.UserToken = ''
  },
  // 保存用户名
  SAVE_NAME (state, userName) {
    state.userName = userName
  },
  // 保存密码
  SAVE_PASSWORD (state, password) {
    state.password = password
  },
  // 保存用户ID
  SAVE_USER_ID (state, userId) {
    state.userId = userId
  },
  //
  SAVE_NEWS_STATE (state, newsEditor) {
    state.newsEditorState = newsEditor
  },
  SAVE_MENU_INDEX (state, menuIndex) {
    state.menuIndex = menuIndex
  },
  SAVE_MENU_STATE (state, menuState) {
    state.menuState = menuState
  },
  toggleNavCollapse (state) {
    state.isSidebarNavCollapse = !state.isSidebarNavCollapse
  },
  setCrumbList (state, list) {
    state.crumbList = list
  }
}
